using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iTron.Model.GridItems
{
    class Bike : GridItem
    {

        public Bike(int direction, int id, int x, int y)
        {
            this.directionFrom = direction;
            this.directionTo = direction;
            this.playerID = id;
            this.x = x; // 0-7
            this.y = y; // 0-7
            this.isBike = true;
        }

        public void drive()
        {
            switch (directionTo)
            {
                case Utils.DIRECTION_TOP:
                    this.y--;
                    break;
                case Utils.DIRECTION_RIGHT:
                    this.x++;
                    break;
                case Utils.DIRECTION_BOTTOM:
                    this.y++;
                    break;
                case Utils.DIRECTION_LEFT:
                    this.x--;
                    break;
                default:
                    return;
            }
        }
    }
}